#pragma once
#include "../../StdAfx.h"
#include "HjMesh.h"

enum DATA_TYPE
{
    NULL_DATA = 0,
	BOOL_DATA,
	INT_DATA,
	FLOAT_DATA,
	STRING_DATA,
	STRING2_DATA,
	VECTOR_DATA,
	COLOR_DATA,
	FACE_DATA,
	MATRIX_DATA,
};

class CHjLoadMng
{
public:
	FILE*				m_pFile;

    char				m_pBuffer[MAX_PATH];
	char				m_pString[MAX_PATH];    

public:
	bool	LoadAseFile( char* pFileName , int* pNumMaterial , CHjMesh* pObject );

	bool	GetSceneData( CHjMesh* pObject );
	bool	GetMaterialData( CHjMesh* pObject , int* pNumMaterial );
	bool	GetGeomObjectData( CHjMesh* pObject , int* pNumMaterial );
	bool	GetGeomObjectMeshData( CHjMesh* pObject , HJ_GEOMOBJECT* pGeomObject , int* pNumMaterial );
	bool	GetGeomObjectAnimation( CHjMesh* pObject , HJ_GEOMOBJECT* pGeomObject );
	bool	GetGeomObjectPosTrack( CHjMesh* pObject , HJ_POSTRACK* pTrack , int nTrack );
	bool	GetGeomObjectRotTrack( CHjMesh* pObject , HJ_ROTTRACK* pTrack , int nTrack );
	bool	GetGeomObjectScaleTrack( CHjMesh* pObject , HJ_SCALETRACK* pTrack , int nTrack );

	int		CheckTextureMapData();

    // Util

	bool	GetDataFromFile( char* pString = NULL , void* pData = NULL , DATA_TYPE nType = NULL_DATA  , char* pEndStr = "}" );
	bool	EndData( char* pDestString , char* pSrcString = NULL );

public:
	CHjLoadMng(void);
	~CHjLoadMng(void);
};
